package com.wxh.order.feign;

import com.wxh.order.entity.User;
import org.springframework.stereotype.Component;

/**
 * 使用Feign的Hystrix熔断功能
 * UserFeignClient执行失败后回调
 *
 * @author wxh
 */
@Component
public class UserHystrixBack implements UserFeignClient {

    @Override
    public User getUser(Long userId) {
        return new User().error();
    }

    @Override
    public User getUser(User user) {
        return new User().error();
    }

}
